
import { https, https_upload } from '@/utils/http.js'

// show_loading 是否显示加载中 默认为true
// duplicate_submit 是否限制重复请求（1秒内如果多个请求都为true，只有一个请求会成功，其余失败）
// duplicate_submit 默认为false

export const loginApi = (params, show_loading = true) => {
    return https({ url: 'api.login/login', method: 'POST', show_loading: show_loading }, params)
}

// 首页
export const indexApi = () => {
    return https({ url: 'api.index/index', method: 'GET' })
}

// 获取磅差预警列表
export function getPoundDifferenceWarningList(params, show_loading = true) {
    return https({ url: 'api.index/pound_difference_warning', method: 'POST', show_loading: show_loading }, params)
}


// 审核列表
export function getAuditList(params, show_loading = true) {
    return https({ url: 'api.index/audit_list', method: 'POST', show_loading: show_loading }, params)
}

export function getAuditInfo(params, show_loading = true) {
    return https({ url: 'api.index/audit_info', method: 'GET', show_loading: show_loading }, params)
}

export function changeAuditStatus(params, show_loading = true) {
    return https({ url: 'api.index/audit_status', method: 'POST', show_loading: show_loading }, params)
}

// 应收
export function collectAllStatistics(params, show_loading = true) {
    return https({ url: 'api.finance/collectAllStatistics', method: 'GET', show_loading: show_loading }, params)
}

// 应收详情
export function collectAllStatisticsDetail(params, show_loading = true) {
    return https({ url: 'api.finance/collectAllStatisticsDetail', method: 'GET', show_loading: show_loading }, params)
}

// 应付
export function meetAllStatistics(params, show_loading = true) {
    return https({ url: 'api.finance/meetAllStatistics', method: 'GET', show_loading: show_loading }, params)
}

// 应付详情
export function meetAllStatisticsDetail(params, show_loading = true) {
    return https({ url: 'api.finance/meetAllStatisticsDetail', method: 'GET', show_loading: show_loading }, params)
}